curl --request PUT \
--url https://api.example.com/api/pedidos/{id}curl --request PUT \
--url https://api.example.com/api/pedidos/{id}Authorization: Bearer YOUR_JWT_TOKEN
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Long | Yes | Order ID to update |
PedidoDetalleDTO object with updated values.
{
"usuario": {
"usuario_id": 5
},
"estado": "ENVIADO",
"detalles": [
{
"detalle_id": 101,
"producto": {
"producto_id": 10
},
"cantidad": 2,
"precioUnitario": 49.99
},
{
"detalle_id": 102,
"producto": {
"producto_id": 15
},
"cantidad": 1,
"precioUnitario": 129.99
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
usuario.usuario_id | Long | Yes | User ID |
estado | String | Yes | Updated order status |
detalles | Array | Yes | Array of order line items |
detalles[].detalle_id | Long | No | Line item ID (for existing items) |
detalles[].producto.producto_id | Long | Yes | Product ID |
detalles[].cantidad | Integer | Yes | Quantity |
detalles[].precioUnitario | BigDecimal | Yes | Unit price |
PENDIENTE - Order pendingPAGADO - Order paidENVIADO - Order shippedENTREGADO - Order deliveredCANCELADO - Order cancelled{
"pedido_id": 42,
"referencia": "ORD-2026-042",
"usuario": {
"usuario_id": 5,
"username": "john_doe",
"email": {
"address": "john@example.com"
}
},
"fechaPedido": "2026-03-11T14:22:35",
"estado": "ENVIADO",
"detalles": [
{
"detalle_id": 101,
"producto": {
"producto_id": 10,
"nombre": "BILLY Bookcase",
"precioCantidad": 49.99,
"precioMoneda": "USD",
"es_destacado": false
},
"cantidad": 2,
"precioUnitario": 49.99,
"subtotal": 99.98
},
{
"detalle_id": 102,
"producto": {
"producto_id": 15,
"nombre": "MALM Dresser",
"precioCantidad": 129.99,
"precioMoneda": "USD",
"es_destacado": true
},
"cantidad": 1,
"precioUnitario": 129.99,
"subtotal": 129.99
}
],
"total": 229.97
}
curl -X PUT "https://api.iquea.com/api/pedidos/42" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"usuario": {
"usuario_id": 5
},
"estado": "ENVIADO",
"detalles": [
{
"detalle_id": 101,
"producto": {
"producto_id": 10
},
"cantidad": 2,
"precioUnitario": 49.99
}
]
}'
| Code | Description |
|---|---|
| 200 | Success - Order updated |
| 400 | Bad request - Invalid order data |
| 401 | Unauthorized - Invalid or missing token |
| 404 | Order not found |
| 500 | Internal server error |